Skip to content

feat(agent): PublishMiniApp — let the agent publish MiniApps to the market - #1875

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:worktree-agent-publish-miniapp
Jul 30, 2026
Merged

feat(agent): PublishMiniApp — let the agent publish MiniApps to the market#1875
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:worktree-agent-publish-miniapp

Conversation

@bobleer

@bobleer bobleer commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Why

When a user has the BitFun Agent build a MiniApp and then says “发布到市场”, the agent had no way to help — the entire submission flow (auth, packaging, upload, submit) was reachable only through the desktop 我的投稿 form. This PR closes that gap end-to-end.

What

New PublishMiniApp agent tool (assembly/core):

  • One call publishes an installed app: listing metadata (name/description/icon/tags) comes from meta.json; the local category is mapped onto the market's category set (utility→utilities, dev→developer, game→entertainment, …); the slug is derived from the app name (CJK-safe fallback); the release number and listing id are resolved automatically from the user's submission history.
  • Signed-out UX: the tool starts the desktop GitHub auth flow, returns the authorization link for the user to click, and polls in the background so the approval lands in the shared keychain — calling the tool again continues publishing. Pending-review submissions for the same slug are detected and reported instead of double-submitting.
  • Takes 1–5 screenshot paths (server requires ≥1); missing screenshots produce actionable guidance instead of a server round-trip.
  • Registered across the tool plan / materialization / registry manifests / agent mode allow-lists, with the same permission-prompt pattern as InitMiniApp (publishing still requires the user to approve the tool call).

Shared orchestration (services-integrations::miniapp_market::submit):

  • The draft → package → screenshots → submit sequence moves out of the Tauri command into the service crate; the desktop command and the agent tool now share one implementation (desktop handler shrinks by ~64 lines). Progress is mirrored onto the existing miniapp-market-upload-progress event, so an open submissions view displays agent-driven uploads live.

Docs/UI: miniapp-dev skill (both copies) documents the publish flow and its guardrails; tool card metadata added for the chat UI; stale InitMiniApp exposure-doc row corrected (Deferred → Direct).

Testing

  • cargo test -p bitfun-services-integrations --features miniapp-market miniapp_market:: — 10 passed (release resolution, slug suggestion, category mapping)
  • cargo test -p bitfun-core miniapp_publish — 3 passed; registry:: — 49 passed; modes:: — 10 passed; bitfun-tool-packs — 8 passed
  • cargo check -p bitfun-desktop / -p bitfun-core clean; web-ui type-check clean
  • Not yet exercised against the production market (needs a signed-in desktop session); suggest one manual publish on a test slug before release.

Users could ask the agent to build a MiniApp but not to publish it — the
market submission flow lived only behind the desktop form. Add a
PublishMiniApp agent tool that derives listing metadata from the app
manifest (with slug suggestion, local→market category mapping, and
release-number resolution from submission history), walks the full
draft → package → screenshots → submit flow, and hands the user a
GitHub authorization link (polled in the background) when signed out.

The submission orchestration moves from the Tauri command into
services-integrations::miniapp_market::submit so the desktop UI and the
agent tool share one implementation. Upload progress is mirrored onto
the existing miniapp-market-upload-progress event so an open
submissions view shows agent-driven uploads. The miniapp-dev skill
documents the publish flow; the stale InitMiniApp exposure row is
corrected.
@bobleer
bobleer marked this pull request as ready for review July 30, 2026 04:26
@bobleer
bobleer merged commit c2aebc2 into GCWing:main Jul 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant